package net.imwork.lee9213.service;

import net.imwork.lee9213.helper.DatabaseHelper;
import net.imwork.lee9213.model.Customer;

import java.util.List;

/**
 * 提供客户数据服务
 *
 * @author lee9213@163.com
 * @version 1.0
 * @date 2017/3/13 21:56
 */
public class CustomerService {

    /**
     * 获取客户列表
     * @param keyword
     * @return
     */
    public List<Customer> query(String keyword){
        String sql = "SELECT * FROM CUSTOMER";
        return DatabaseHelper.queryEntityList(Customer.class,sql);
    }

    /**
     * 获取客户
     * @param id
     * @return
     */
    public Customer get(Long id){
        return null;
    }

    /**
     * 创建客户
     * @return
     */
    public boolean save(Customer customer){
        return false;
    }

    /**
     * 更新客户
     * @return
     */
    public boolean update(Customer customer){
        return false;
    }

    /**
     * 删除客户
     * @param id
     * @return
     */
    public boolean delete(Long id){
        return false;
    }
}
